#pragma once

#include "Algorithm.h"
#include <vector>

typedef std::vector<Point> PointArray;

class Mod3Algorithm:public IAlgorithm 
{
protected:
	BattleShipPtr m_battle;
	bool m_foundShip[MAX_SHIP + 1];
	int m_maxLength, m_minLength;
	int m_addStep;
	PointArray m_checkPoint;
	PointArray m_pendingPoint;

	void RecheckPoint();
	void CleanUp();
	virtual void AddMorePoint();
	void AddPoint(Point p);
public:
	virtual void Initialize(BattleShipPtr _battle);
	Point GuessPos();
	virtual void FoundPos(Point p, bool value);
	virtual void FoundShip(ShipPtr ship);
	Point GuessDirection(Point lastP, Ship::Rotation& direction);
};